<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let l = +8
        let i
        while(i!=l){
            i = +prompt("输入")
            i==l?alert("对了"):i<l?alert("小了"):alert("大了")
        }
        
    </script>
</body>
</html>